-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: social history conversion #7
Conversation
…into mcm/fix-social-history-obs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one question about how something works but this is really great!
{% include 'Section/SocialHistory' SOCIALOBS: socialObs SOCIALTEXT: socialHistoryText -%} | ||
{% include 'Resource/Patient' patientRole: msg.ClinicalDocument.recordTarget.patientRole ID: patientId SOCIALOBS: socialObs SOCIALTEXT: socialHistoryText contact: msg.ClinicalDocument.participant.associatedEntity -%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
socialHistoryText
isn't defined yet right? So is the point of passing the blank socialHistoryText
to Section/SocialHistory
to give it a value that can be used in Resource/Patient
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, it's a weird hack that takes advantage of leaky variable scopes 😬
This PR turned a little meandering - apologies.
nullFlavor = UNK
to still be converted as long as they have original text in their value fieldUtil/IsSocialHistoryObservation
template.capture
this result when including the template in another template and use its value to simplify/dry out the code therecase/when
to dry out a lot of repeated template ID-ing (and also add the check to look at the first as sometimes this had more than one thing and then the old logic just wasn't hitting 😬 )SOCIALOBS
in the social history_entry.liquid
and just make it a normal special case as it wasn't needed and was causing weird merged objects because we were also converting it in the regular way.value[x]
fhir mappings and use it in a lot of places